<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of PageResources
 *
 * @author seth
 */
class PageResources  {
    var $IMAGES =7 ;
    var $AUDIO=8;
    var $VIDEO=9;
    var $DOC=10;
    var $ZIP=14;
    var $PLAINTEXT=15;
    var $EXE=16;
     var $FORM=21;
    var $OTHERS=17;

    var $resourceNum=0;
    var $imagesNum=0;
    var $audioNum=0;
    var $videoNum=0;
    var $docNum=0;
    var $othersNum=0;
    var $formNum=0;
 
    function  __construct() {
    }

//keeps truck of the varoius resources together with their numbers
    function updateResource($catid){
        switch ($catid)
        {
            case $this->IMAGES:{
                 $this->imagesNum++;
                 break;}
            case $this->AUDIO:{
                    $this->audioNum++;
                    
                 break;}
            case $this->DOC:
            case $this->PLAINTEXT:{$this->docNum++;
                    break;}
            case $this->VIDEO:{$this->videoNum++;
                    break;}
case $this->FORM:{
    $this->formNum;
     break;
}
            default:
                    $this->othersNum++;break;

         }
         $this->resourceNum++;
   }
   function assignPositions($array,$pos,$type)
   {
      if($type>1)
      $array.=",".$pos;

      return $array;
   }

                    }
                    ?>
